package com.cy.dda.dao.mapper.customer;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.cy.dda.model.domain.customer.Customer;
import com.cy.dda.model.query.customer.CustomerListAdminQuery;
import com.cy.dda.model.query.customer.CustomerListQuery;
import com.cy.dda.model.vo.customer.CustomerDetailInfoAdminVO;
import com.cy.dda.model.vo.customer.CustomerListAdminVO;
import com.cy.dda.model.vo.customer.CustomerListVO;
import com.cy.dda.model.vo.customer.CustomerPersonalDataVO;

import tk.mybatis.mapper.common.BaseMapper;

/**
 * Customer
 *
 * @author: tanyilin
 * @create: 2018年10月31日 下午1:53:18
 */
@Mapper
public interface CustomerMapper extends BaseMapper<Customer> {

	/**
	 * 后台，有条件查询客户列表总数
	 * 
	 * @param query
	 * @return
	 */
	int selectCustomerListAdminCount(CustomerListAdminQuery query);
	
	/**
	 * 后台-客户列表
	 * 
	 * @param query
	 * @return
	 */
	List<CustomerListAdminVO> selectCustomerListAdmin(CustomerListAdminQuery query);
	
	/**
	 * 后台-客户信息详情
	 * 
	 * @param customerId
	 * @return
	 */
	CustomerDetailInfoAdminVO selectCustomerDetailInfoAdminVO(@Param("customerId") Long customerId);
	
	/**
	 * 前台-客户个人资料
	 * 
	 * @param customerId
	 * @return
	 */
	CustomerPersonalDataVO selectCustomerPersonalDataVO(@Param("customerId") Long customerId);
	
	/**
	 * 前台，有条件查询客户列表总数
	 * 
	 * @param query
	 * @return
	 */
	int selectCustomerListCount(CustomerListQuery query);
	
	/**
	 * 前台，查询我的客户列表
	 * 
	 * @param query
	 * @return
	 */
	List<CustomerListVO> selectCustomerList(CustomerListQuery query);
}
